package com.probiz.estore.webapp.action;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;

import com.probiz.estore.common.model.system.AppUser;
import com.probiz.estore.common.service.LoginNtService;
import com.probiz.estore.core.controller.BaseController;
import com.probiz.estore.webapp.util.RequestContext;

public class PostLogin4CasLoginDlgController extends BaseController {

	private LoginNtService loginNtService;

	public void setLoginNtService(LoginNtService loginNtService) {
		this.loginNtService = loginNtService;
	}

	public ModelAndView defaultAction(HttpServletRequest request, HttpServletResponse response) throws ServletException {
		AppUser appUser = (AppUser) RequestContext.getCurrentUser();
		loginNtService.afterLogin(request, response, appUser);
		return new ModelAndView("customer/postLogin4CasLoginDlg");
	}

}